﻿function deleteDataReport(id) {
    var url = "/DataReport/DeleteReport";
    var data = new Object();
    data.Id = id;
    if (confirm("[系统提示:]\n\t删除该模板后不能恢复,您确定要删除吗?")) {
        jQuery.ajax({
            url: url,
            data: data,
            type: "post",
            dataType: "json",
            success: function (msg) {
                if (msg.errors.length > 0) {
                    alert("[系统提示:]\n\t" + msg.errors.toString());
                }
                else {
                    alert("[系统提示:]\n\t删除成功!");
                    window.location = window.location;
                }

            },
            error: function () {
                alert("[系统提示:]\n\t请求失败!");
            }
        });
    }
}